Repository navigation
fix(web): a refused desktop install shows as failed instead of downloaded - #41262
Conversation
Repro for #38217. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…aded On macOS a cancelled or refused install authorization reaches the desktop as an updater error after installUpdate already returned accepted. The desktop recovers to status "downloaded" with errorContext "install", but the web showed that as a fresh download and treated the restart as done. - The update tooltip says "Install failed … Click to retry." for that state. - installDesktopUpdate waits for that later failure after an accepted install, so the sidebar, update-everything and Settings report it and end their pending restart instead of showing "Restarting…" forever. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
On macOS, when the user cancels or is not allowed the admin prompt that installing an update needs, T3 Code acted as if the restart had worked. The update still showed as ready to install, and the "update everything" capsule sat on "Restarting…" with nothing to click. Now the failure is shown and the user can try the restart again.
getDesktopUpdateButtonTooltipshows "Install failed for {version}. Click to retry." when the desktop has returned to downloaded after a failed install, as it already does for failed downloads.installDesktopUpdatekeeps listening after an accepted install for the failure the desktop reports later. The sidebar pill, update-everything, the track-switch dialog and Settings use it, so they show "Could not install update" and end their pending restart.Fixes #38217
Reproduction on main
Commit 0356d68 (origin/main). On a pool Mac (macOS 26, Apple silicon): downloaded the signed T3-Code-0.1.12-nightly.20261122.5111-arm64.zip release, extracted it into a work directory and made the bundle root-owned (sudo chown -R root:wheel) so Squirrel.Mac must ask for admin authorization to install, then launched it with T3CODE_HOME pointed at an isolated directory and --remote-debugging-port to drive it. The app offered 0.1.12-nightly.20261123.5124; downloaded it via the desktop bridge (status downloaded). Attempt 1: Settings > About > Install > Confirm. Attempt 2: turned off the Codex and Claude providers in that isolated home (so the sidebar pill becomes the plain single-app install instead of 'Update this app and 2 providers', which would have updated the shared Mac's global CLIs), then clicked the sidebar pill 'Update 0.1.12-nightly.20261123.5124 downloaded. Click to restart and install.' > Confirm. Both times the desktop log shows electron-updater re-checking, Squirrel.Mac downloading, then an
erroreventThe operation couldn't be completed. (OSStatus error -60007.)(errAuthorizationInteractionNotAllowed: no prompt can show for an app launched over SSH; a user cancelling the prompt fails on the same privileged-ShipIt launch path, -60006). It was logged as 'Desktop updater install operation reported an error.' within about a second. The desktop recovered (window kept, backends restarted, state {status: downloaded, errorContext: install, canRetry: true, message set}), but the UI showed no error: no toast, Settings still said 'Update available.' with Install, and the pill still said 'downloaded. Click to restart and install.' The second attempt failed the same way, also silently. The real cancelled prompt was not seen (nobody can click on the pool Mac). The 'Update this app and N providers' flow was not run on the Mac to avoid changing the shared Mac's CLIs; from code, useUpdateEverything returns once installLocal resolves true and leaves the run in phase 'installing', so the capsule shows 'Restarting…' with no action. A failing unit test is on factory/repro-38217.Evidence
Environment: macOS 26.6.2 arm64, light theme, 1100×780. Separate commit builds and fresh isolated homes; providers disabled. Each commit's rebuilt app.asar ran in the nightly release's signed native shell, with the bundle root-owned. Both sides downloaded the real nightly update and encountered OSStatus -60007 twice.
Steps: Settings > About > Install > Confirm; wait for failure recovery; close Settings; sidebar update control > Confirm to retry in the same session; hover the control after recovery. The unrelated local CLI path is masked.
Base Settings failed silently; head showed 'Could not install update'. The base sidebar retry did show an error toast in this run, but retained the misleading downloaded label. Head reported the failure and changed the label to 'Install failed … Click to retry'.
UI driver · Bundle assembly and isolated seed script · Runtime errors and matching payload hashes · Before transcript · After transcript
Not shown:
Tests
vp test run src/components/desktopUpdate.logic.test.ts(apps/web) on the repro commit without the fix: 1 failed (the repro test: got 'Update 1.1.0 downloaded. Click to restart and install.')vp test run src/components/desktopUpdate.logic.test.ts(apps/web) with the fix: 11 passedvp run check:changed: format, lint, knip, typecheck (2 packages), tests (3 files, 32 passed), react compiler all passNot in this change
Who did the work
Run by the t3code factory in T3 Code.